Clean up serial-line code. Pull out arch-dep to asm header file.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
3ddb79c2QF5-pZGzuX4QukPCDAl59A xen/include/asm-x86/processor.h
40cf1596bim9F9DNdV75klgRSZ6Y2A xen/include/asm-x86/regs.h
3ddb79c2plf7ciNgoNjU-RsbUzawsw xen/include/asm-x86/rwlock.h
+42136b49h6MkeayfuOaTPcJQWKga2g xen/include/asm-x86/serial.h
405b8599BsDsDwKEJLS0XipaiQW3TA xen/include/asm-x86/shadow.h
3ddb79c3Hgbb2g8CyWLMCK-6_ZVQSQ xen/include/asm-x86/smp.h
3ddb79c3jn8ALV_S9W5aeTYUQRKBpg xen/include/asm-x86/smpboot.h
printk("dump_pageframe_info not implemented\n");
}
-///////////////////////////////
-// from drivers/char/serial.c
-///////////////////////////////
-
-#include <asm/hpsim_ssc.h>
-
-int
-ia64_serial_putc(unsigned char c)
-{
- if (platform_is_hp_ski()) {
- ia64_ssc(c, 0, 0, 0, SSC_PUTCHAR);
- }
- else {
-// this is tested on HP Longs Peak platform... it
-// will probably work on other Itanium platforms as
-// well, but undoubtedly needs work
- longs_peak_putc(c);
- }
- return 1;
-}
-
///////////////////////////////
// from common/physdev.c
///////////////////////////////
/* Must do this early -- e.g., spinlocks rely on get_current(). */
set_current(&idle0_exec_domain);
+ early_setup_arch();
+
/* We initialise the serial devices very early so we can get debugging. */
serial_init_stage1();
- init_console();
-#if 0
- /* HELLO WORLD --- start-of-day banner text. */
- printk(XEN_BANNER);
- printk(" http://www.cl.cam.ac.uk/netos/xen\n");
- printk(" University of Cambridge Computer Laboratory\n\n");
- printk(" Xen version %d.%d%s (%s@%s) (%s) %s\n",
- XEN_VERSION, XEN_SUBVERSION, XEN_EXTRAVERSION,
- XEN_COMPILE_BY, XEN_COMPILE_DOMAIN,
- XEN_COMPILER, XEN_COMPILE_DATE);
-#endif
-#ifndef IA64
- printk(" Latest ChangeSet: %s\n\n", XEN_CHANGESET);
-#endif
+ init_console();
set_printk_prefix("(XEN) ");
#ifdef IA64
* it permits debugging of seriously-toasted machines (e.g., in situations
* where a device driver within a guest OS would be inaccessible).
*
- * Copyright (c) 2003-2004, K A Fraser
+ * Copyright (c) 2003-2005, K A Fraser
*/
#include <xen/config.h>
#include <xen/serial.h>
#include <asm/io.h>
-/* opt_com[12]: Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
-static unsigned char opt_com1[30] = "", opt_com2[30] = "";
-string_param("com1", opt_com1);
-string_param("com2", opt_com2);
-
/* Register offsets */
#define RBR 0x00 /* receive buffer */
#define THR 0x00 /* transmit holding */
#define UART_ENABLED(_u) ((_u)->baud != 0)
#define DISABLE_UART(_u) ((_u)->baud = 0)
-#ifdef CONFIG_X86
-static inline int arch_serial_putc(uart_t *uart, unsigned char c)
-{
- int space;
- if ( (space = (inb(uart->io_base + LSR) & LSR_THRE)) )
- outb(c, uart->io_base + THR);
- return space;
-}
-#endif
+/* Architecture-specific private definitions. */
+#include <asm/serial.h>
+
+/* opt_com[12]: Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
+static unsigned char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
+string_param("com1", opt_com1);
+string_param("com2", opt_com2);
/***********************
// manufactured from component pieces
// defined in linux/arch/ia64/defconfig
+//#define CONFIG_IA64_GENERIC
#define CONFIG_IA64_HP_SIM
#define CONFIG_IA64_L1_CACHE_SHIFT 7
// needed by include/asm-ia64/page.h
(likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
access_ok(type,addr,count*size))
-// see drivers/char/serial.c
-#define arch_serial_putc(uart,c) ia64_serial_putc(c)
// without this, uart_config_stageX does outb's which are non-portable
#define NO_UART_CONFIG_OK
// x86 typedef still used in sched.h, may go away later
//typedef unsigned long l1_pgentry_t;
-// removed from include/xen/types.h (why?)
-typedef unsigned long uint64_t;
-typedef unsigned int uint32_t;
-
// see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
#define pfn_info page
-// this file is now obsolete and can be removed
-#include <asm/hpsim_ssc.h>
-
-static inline int arch_serial_putc(unsigned char c)
-{
- if (platform_is_hp_ski()) {
- ia64_ssc(c, 0, 0, 0, SSC_PUTCHAR);
- }
- else {
-// this is tested on HP Longs Peak platform... it
-// will probably work on other Itanium platforms as
-// well, but undoubtedly needs work
- longs_peak_putc(c);
- }
- return 1;
-}
-
--- /dev/null
+/* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
+/******************************************************************************
+ * asm-x86/serial.h
+ *
+ * Architecture-specific private serial definitions.
+ */
+
+#ifndef __ASM_X86_SERIAL_H__
+#define __ASM_X86_SERIAL_H__
+
+#define OPT_COM1_STR ""
+#define OPT_COM2_STR ""
+
+static inline int arch_serial_putc(uart_t *uart, unsigned char c)
+{
+ int space;
+ if ( (space = (inb(uart->io_base + LSR) & LSR_THRE)) )
+ outb(c, uart->io_base + THR);
+ return space;
+}
+
+#endif /* __ASM_X86_SERIAL_H__ */
+/* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
/******************************************************************************
* serial.h
*
* it permits debugging of seriously-toasted machines (e.g., in situations
* where a device driver within a guest OS would be inaccessible).
*
- * Copyright (c) 2003-2004, K A Fraser
+ * This file contains public definitions. The arch-specific header
+ * contains only private hooks, and is not included from this file.
+ *
+ * Copyright (c) 2003-2005, K A Fraser
*/
#ifndef __XEN_SERIAL_H__